﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
///KHJB 的摘要说明
/// </summary>
public class KHJB
{
	public KHJB()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
  }

  public static SqlDataReader GetXX(string sID)
  {
    string sSql = "select * from jcxx_khjb where khjbid=@0";
    SqlParameter[] cmdParams = { new SqlParameter("@0", SqlDbType.VarChar, 20) };
    cmdParams[0].Value = sID;
    SqlDataReader dr = DbHelperSQL.ExecuteReader(sSql, cmdParams);
    return dr;
  }

  public static DataSet GetDS()
  {
    string sSql = "select ROW_NUMBER() OVER (ORDER BY khjb desc) AS xh,* from jcxx_khjb";
    DataSet ds = DbHelperSQL.Query(sSql);
    return ds;
  }

  public static DataSet GetDS_W()
  {
    string sSql = "select khjbid,khjb from jcxx_khjb";
    DataSet ds = DbHelperSQL.Query(sSql);
    DataRow dr = ds.Tables[0].NewRow();
    dr[0] = "0";
    dr[1] = "无";
    ds.Tables[0].Rows.InsertAt(dr, 0);
    return ds;
  }
}
